-- GENERATED SPELL FOR [Durnholde Warden] --


function spell0_17833(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(17201,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17833', 586, 1)
end

function spell1_17833(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(15586,pUnit)
pUnit:RegisterEvent('Sorts_17833', 3500, 1)
end

function spell2_17833(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(22883,pUnit)
pUnit:RegisterEvent('Sorts_17833', 3500, 1)
end

function spell3_17833(pUnit, Event) --@Psychic Scream,Self--
pUnit:FullCastSpellOnTarget(22884,pUnit)
pUnit:RegisterEvent('Sorts_17833', 4342, 1)
end

function spell4_17833(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(15654,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17833', 18000, 1)
end

function spell5_17833(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(34941,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17833', 18000, 1)
end

function Sorts_17833(pUnit, Event)
local choix_sorts_17833 = math.random(0, 5)
if choix_sorts_17833 == 0 then
pUnit:RegisterEvent('spell0_17833', 1, 1)
end
if choix_sorts_17833 == 1 then
pUnit:RegisterEvent('spell1_17833', 1, 1)
end
if choix_sorts_17833 == 2 then
pUnit:RegisterEvent('spell2_17833', 1, 1)
end
if choix_sorts_17833 == 3 then
pUnit:RegisterEvent('spell3_17833', 1, 1)
end
if choix_sorts_17833 == 4 then
pUnit:RegisterEvent('spell4_17833', 1, 1)
end
if choix_sorts_17833 == 5 then
pUnit:RegisterEvent('spell5_17833', 1, 1)
end
end

function mob17833_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17833', math.random(1500, 3000), 1)
end

function mob17833_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17833_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17833_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17833, 1, 'mob17833_Action')
RegisterUnitEvent(17833, 2, 'mob17833_Leave')
RegisterUnitEvent(17833, 3, 'mob17833_Kill')
RegisterUnitEvent(17833, 4, 'mob17833_Die')
